home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 4
/
Aminet 4 - November 1994.iso
/
aminet
/
comm
/
cnet
/
calllog32.lha
/
Call_Log1
/
Call_Logger
< prev
next >
Wrap
Text File
|
1994-06-21
|
13KB
|
229 lines
/**************************************************************************\
$VER: Call Logger, v3.2 by Dotoran (19-Jun-94)
\**************************************************************************/
options results ; signal on SYNTAX ; signal on ERROR ; signal on IOERR
tr=transmit ; se=sendstring ; gc=getchar ; qu=query
/*************************************************************************\
SysOp Definable Variables: See the _READ_ME! file for more info!
\*************************************************************************/
V1 = "X" /* Ignore these Port Numbers. If X, log all Ports. */
V2 = "X" /* Ignore these ID Numbers. If X, log all ID Numbers. */
V3 = "X" /* Ignore these Access Levels. If X, log all Accesses. */
V4 = 10 /* Max calls to log ever. Will never exceed this value. */
V5 = 0 /* Save Call-Backs to the Log? ( 1 = Yes / 0 = No ) */
V6 = 5 /* Log SysOp(ID1) only when (s)he makes this many calls. */
V7 = 2 /* Activity Flag Backdrop: 1:dots, 2:dashes, 3:lowercase, */
/* 4:stars, 5:sm. x's 6:equals' */
V8 = "#" /* 7: Use Ascii character in V8 as filler when V7=7. */
V9 = 1 /* Allow Log to be Aborted. ( 1 = Yes / 0 = No ) */
V10 = 1 /* Call_Log Output Type. ( 0 = Elaborate / 1 = Quick ) */
V11 = 0 /* Call_Log Ordering. ( 0 = Newest 1st / 1 = Oldest 1st ) */
V12 = "db" /* Quick Log Entry Colors (The MCI code that follows c) */
V13 = 0 /* Notate Call_Log Ignores? ( 0 = No / 1 = Yes ) */
D1 = 'GFILES:' /* Where the Call_Log is stored. */
D2 = 'PFILES:Call_Log1/' /* Where Call_Logger files are stored. */
/*************************************************************************\
The values of D1 and D2 should both end with either a : or a /
\*************************************************************************/
getuser 23 ; port=result ; getuser 1 ; handle=result
getuser 40 ; id=result ; getuser 15 ; access=result
getuser 24 ; baud=left(result,2) ; total=V4 ; flag=0
if index(v1,port)>0 | index(v2,id)>0 | index(v3,access)>0 then flag=1
if flag=1 & V13=0 then exit
if V10=0 then call DATA0 ; if V10=1 then call DATA1
call READCONFIG ; call COMPUTERS ; call READLOG
if index(lc.2,handle)>0 & V5=0 then flag=1
if id=1 & sysopcalls<V6 then flag=1
else do ; sysopcalls=0 ; call SAVECONFIG ; end
if flag=1 & V13=0 then exit
getuser 1100465 ; com=comp.result ; getuser 1400472 ; calls=result
getuser 1400476 ; posts=result ; getuser 1400488 ; uploads=result
tr 'Logging your call...'
do i=1 to 9 ; a.i=0 ; end i ; file='sysdata:Log/port'||port
call open(f1,file,'r')
do j=1 until eof(f1) ; c.j=readln(f1) ; end j
call close(f1)
do i=1 to j
if index(c.i,'SIGNON')>0 then key1=i
if index(c.i,'SIGNOFF')>0 then key2=i
if index(c.i,'NEW USER')>0 then a.9=1
end i ; if a.9=1 then new='*' ; else new=' '
s1=substr(c.key1,11,5) ; s2=left(s1,2) ; hr='a' ; if s2>'11' then hr='p'
if s2>'12' then s2=s2-12 ; if s2='00' then s2='12'
s1=s2||substr(s1,3)||hr ; signon=right(s1,6)
s1=substr(c.key2,11,5) ; s2=left(s1,2) ; hr='a' ; if s2>'11' then hr='p'
if s2>'12' then s2=s2-12 ; if s2='00' then s2='12'
s1=s2||substr(s1,3)||hr ; signoff=right(s1,6) ; key3=key2+1
do i=key3 to j
if index(c.i,'po')>0 then a.1=1 ; if index(c.i,'re')>0 then a.2=1
if index(c.i,'uf')>0 then a.3=1 ; if index(c.i,'df')>0 then a.4=1
if index(c.i,'pf')>0 then a.5=1 ; if index(c.i,'gf')>0 then a.6=1
if index(c.i,'fb')>0 then a.7=1 ; if index(c.i,'ms')>0 then a.8=1
end i
if V10=0 then do
s1='ceP c9R cfU caD ceG c9T cfF caMcd]' ; s2=''
if V7=1 then s2='c5. c5. c5. c5. c5. c5. c5. c5.cd]'
if V7=2 then s2='c5- c5- c5- c5- c5- c5- c5- c5-cd]'
if V7=3 then s2='c5p c5r c5u c5d c5g c5t c5f c5mcd]'
if V7=4 then s2='c5* c5* c5* c5* c5* c5* c5* c5*cd]'
if V7=5 then s2='c5x c5x c5x c5x c5x c5x c5x c5xcd]'
if V7=6 then s2='c5= c5= c5= c5= c5= c5= c5= c5=cd]'
if V7=7 then do ; do i=1 to 8 ; s2=s2||'c5'||V8||' ' ; end i
s2=strip(s2)||'cd]' ; end
a1='cd['
do i=1 to 8 ; act=act+a.i
if a.i=0 then a1=a1||word(s2,i,1)
else a1=a1||word(s1,i,1)
end i ; if act=0 then a1='cd[ceNothing!cd]'
log='z4 z0cfºcb'||right(port,2)||'cc '||center(id,3)||' cf'||new
log=log||'ca'||left(handle,20)||'c9'||left(baud,3)||a1||' c7'||signon
log=log||' ce'||signoff||'ca'||right(access,4)||' c9'||com
log=log||'cd'||right(calls,4)||'cb'||right(uploads,4)||'ce'
log=log||right(posts,4)||'cfºz4 z0'
if V13=1 & flag=1 then do
log='z4 z0cfºcb'||right(port,2)||'cd ----caOccupiedcd---caFor'
log=log||'cd---caPrivatecd---caUsecd----c7 '||signon||' ce'
log=log||signoff||' cd-caPortcd-caUnAvailablecd- cfºz4 z0'
end
end
if V10=1 then do
s1='P R U D G T F M]' ; s2='' ; a1='['
if V7=1 then s2='. . . . . . . .]' ; if V7=2 then s2='- - - - - - - -]'
if V7=3 then s2='p r u d g t f m]' ; if V7=4 then s2='* * * * * * * *]'
if V7=5 then s2='x x x x x x x x]' ; if V7=6 then s2='= = = = = = = =]'
if V7=7 then do ; do i=1 to 8 ; s2=s2||V8||' ' ; end i
s2=strip(s2)||']' ; end
do i=1 to 8 ; act=act+a.i
if a.i=0 then a1=a1||word(s2,i,1)
else a1=a1||word(s1,i,1)
end i ; if act=0 then a1='[Nothing!]'
log=' c8ºc'||co||right(port,2)||' '||center(id,3)||' '||new
log=log||left(handle,20)||left(baud,3)||a1||' '||signon
log=log||' '||signoff||right(access,4)||' '||com
log=log||right(calls,4)||right(uploads,4)
log=log||right(posts,4)||'c8º'
if V13=1 & flag=1 then do
log=' c8ºc'||co||right(port,2)||' ----Occupied---For---Private---'
log=log||'Use---- '||signon||' '||signoff||' -Port-UnAvailab'
log=log||'le- c8º' ; end
c=index(V12,co) ; if c=length(V12) then c=1 ; else c=c+1
co=substr(V12,c,1) ; end
call open(f1,d1||'Call_Log','w')
do i=1 to 6 ; call writeln(f1,top.i) ; end i
if V11=1 then do ; start=1 ; if logged=total then start=2
do i=start to logged ; call writeln(f1,lc.i)
end i ; call writeln(f1,log) ; end
if V11=0 then do ; end=logged ; if logged=total then end=logged-1
call writeln(f1,log) ; do i=1 to end ; call writeln(f1,lc.i)
end i ; end
do i=1 to 4 ; call writeln(f1,bot.i) ; end i
call close(f1)
logged=logged+1 ; if logged>total then logged=total
call SAVECONFIG
exit
COMPUTERS:
if exists(d2||'Call_Log_Computers3') then do
call open(f1,d2||'Call_Log_Computers3','r')
do i=0 to ct-1 ; comp.i=readln(f1) ; end i
call close(f1) ; return ; end
call open(f1,'cnet:bbsmenu','r') ; ct=0
do until left(j,2)='30' ; j=readln(f1) ; end
do until r='' ; r=readln(f1) ; r=strip(substr(r,2))
comp.ct=left(r,3) ; ct=ct+1 ; end
call close(f1) ; ct=ct-1 ; call SAVECONFIG
call open(f1,d2||'Call_Log_Computers3','w')
do i=0 to ct-1 ; call writeln(f1,comp.i) ; end i
call close(f1)
return
READLOG:
if exists(d1||'Call_Log') then do
call open(f1,d1||'Call_Log','r')
do i=1 to 6 ; j=readln(f1) ; end
do i=1 to logged ; lc.i=readln(f1) ; end i
call close(f1) ; return ; end
call open(f1,d1||'Call_Log','w')
do i=1 to 6 ; call writeln(f1,top.i) ; end i
call writeln(f1,mid.1) ; logged=1
do i=1 to 4 ; call writeln(f1,bot.i) ; end i
call close(f1) ; call SAVECONFIG
signal READLOG
READCONFIG:
if ~exists(d2||'Call_Log_Config') then do ; l=substr(V12,2,1)
call open(f1,d2||'Call_Log_Config','w')
call writeln(f1,'0 <--- Total Calls Logged')
call writeln(f1,'0 <--- Total Computer Types')
call writeln(f1,'0 <--- Total SysOp Calls')
call writeln(f1,l||' <--- Next Quick Log Color')
call close(f1) ; signal READCONFIG ; end
call open(f1,d2||'Call_Log_Config','r')
a=readln(f1) ; logged=word(a,1) ; a=readln(f1) ; ct=word(a,1)
a=readln(f1) ; sysopcalls=word(a,1) ; a=readln(f1) ; co=word(a,1)
call close(f1)
if id=1 then do ; sysopcalls=sysopcalls+1
call SAVECONFIG ; end
return
SAVECONFIG:
a1=left(logged,3)||'<-- Total Calls Logged'
a2=left(ct,3)||'<-- Total Computer Types'
a3=left(sysopcalls,3)||'<-- Total SysOp Calls'
a4=left(co,3)||'<-- Next Quick Log Color'
call open(f1,d2||'Call_Log_Config','w')
call writeln(f1,a1) ; call writeln(f1,a2)
call writeln(f1,a3) ; call writeln(f1,a4)
call close(f1)
return
DATA0:
act=0 ; ct=0 ; logged=0 ; sysopcalls=0
if V9=1 then top.1='f1@4C
ÜÜ
ÕÍ͸
Ü
ÕÍ͸
Ü
Õ¸
ÜÜÜ
Õ¸
ÜÜÜ
ÕÍ͸
Ü
ÕÍ͸
ÜÜÜÜ
Õ¸
ÜÜÜ
ÕÍ͸
Ü
ÕÍ͸
ÜÜ'
if V9=0 then top.1='f1a1@4C
ÜÜ
ÕÍ͸
Ü
ÕÍ͸
Ü
Õ¸
ÜÜÜ
Õ¸
ÜÜÜ
ÕÍ͸
Ü
ÕÍ͸
ÜÜÜÜ
Õ¸
ÜÜÜ
ÕÍ͸
Ü
ÕÍ͸
ÜÜ'
top.2='C
ß
³ ÆÍ͵ ³ ³ Æ͵ ÆÍѾ ³ ³ ³ ³Õ͸
ß
'
top.3='
Ü
ßßßß
ÔÍ;
ß
Ô
ßß
¾
ß
ÔÍ;
ß
ÔÍ;
ß
ÔÍ;
ß
Ô
ß
Ô¾
ßßßß
ÔÍ;
ß
ÔÍ;
ß
ÔÍ;
ßßßß
Ü
'
top.4='
ÉÍÍÑÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÑÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÑÍÍÍÍÍÍÍÑÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍ»
'
top.5="
º
P#
³
ID#
³*
User's Handle
*
=
New³
Bd
³
Activities
³
SignOn
³
SignOff
³
AG
³
Com
³
CaT
³
UpL
³
Pos
º
"
top.6='
ÌÍÍÏÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÏÍÍÏÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÏÍÍÍÍÍÍÍÏÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍ͹
'
bot.1='
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
'
bot.2='
P#
=
Port
Bd
=
Baud
AG
=
AccessGroup
Com
=
Computer
CaT
=
Calls
UpL
=
Uploads
Pos
=
Posts
'
bot.3='
Activities
:
P
:
ost
R
:
esponse
U
:
pload
D
:
ownload
G
:
ame
T
:
ext
F
:
eedback
M
:
ail
'
bot.4='
Caller Log, v3.2 Written by: Dotoran of Frontiers BBS(716)/823-9892
'
getuser 12 ; start='Call Log Started On: '||left(result,15)
mid.1='z4 z0cfº cb'||start||' cfºz4 z0'
return
DATA1:
act=0 ; ct=0 ; logged=0 ; sysopcalls=0
if V9=1 then top.1='f1@4C
ÚÄ¿ÚÄ¿Ú Ú ÚÄ¿Ú¿ Ú ÚÄ¿ÚÄ¿'
if V9=0 then top.1='f1a1@4C
ÚÄ¿ÚÄ¿Ú Ú ÚÄ¿Ú¿ Ú ÚÄ¿ÚÄ¿'
top.2='
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
³ ÃÄ´³ ³ ÿ ÃÁ¿ ³ ³ ³³Ú¿
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»'
top.3=' º
Call Frontiers BBS!
º
ÀÄÙÀ ÙÀÄÙÀÄÙÀÄÙÀ À
3.2
ÀÄÙÀÄÙÀÄÙ
º
(716)/823-9892 (14400)
º'
top.4=' ÌÍÍÑÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÑÍÍÑÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÑÍÊÍÍÍÍÍÑÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍ͹'
top.5=" º
P#
³
ID#
³
*User's Handle *=New
³
Bd
³
Activities
³
SignOn
³
SignOff
³
AG
³
Com
³
CaT
³
UpL
³
Pos
º"
top.6=' ÌÍÍÏÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÏÍÍÏÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÏÍÍÍÍÍÍÍÏÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍ͹'
bot.1=' ÌÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍ͹'
bot.2=' º
P#=Port
³
Bd=Baud
³
AG=AccessGroup
³
Com=Computer
³
CaT=Calls
³
UpL=Uploads
³
Pos=Posts
º'
bot.3=' È»
Activities:
³
P:ost
³
R:esponse
³
U:pload
³
D:ownload
³
G:ame
³
T:ext
³
F:eedback
³
M:ail
ɼ'
bot.4=' ÈÍÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÏÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÏÍÍÍÍͼ'
getuser 12 ; start='Call Log Started On: '||left(result,15) ; l=left(V12,1)
mid.1=' c8º c'||l||start||' c8º'
return
SYNTAX:;ERROR:;IOERR:;er=rc' c7<ce'errortext(rc)'c7> c6in line ca'sigl
gu 1311992;a=result;gu 1311960;b=result;c='cb"cd'a||b'cb"';er='c9Error c6Code ca'er' c6of 'c'n2cf'
er=er||sigl'ce: cb'sourceline(sigl);tr er;logentry er;bufferflush
/** Last Edited: 19-Jun-94 ************************************************\
\****************************************** FRONTIERS BBS (716)/823-9892 **/